package com.roncoo.education;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;

@SpringBootApplication
public class SpringBoot02RestfulApplication {

	public static void main(String[] args) {
		SpringApplication.run(SpringBoot02RestfulApplication.class, args);
	}
	/**
	 * 自定义ObjectMapper
	 * 
	 * @return
	 */
	@Bean
	public MappingJackson2HttpMessageConverter mappingJacksonHttpMessageConverter() {
	    final MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
	    KindoObjectMapper mapper = new KindoObjectMapper();
	    converter.setObjectMapper(mapper);
	    return converter;
	}
}
